Fix Azure scope construction for v20250801preview API#11056
Fix Azure scope construction for v20250801preview API#11056brooke-hamilton merged 7 commits intomainfrom
Conversation
Co-authored-by: brooke-hamilton <[email protected]>
There was a problem hiding this comment.
Pull request overview
This pull request fixes a bug in the Azure scope construction for the v20250801preview API version. The environment configuration loader was incorrectly passing only the raw subscription ID as the scope instead of constructing a full Azure resource ID path, causing recipe deployment failures.
Changes:
- Fixed Azure scope construction in
getConfigurationV20250801()to build proper resource ID paths - Added comprehensive test coverage for both subscription-only and subscription+resource group scenarios
- Updated existing test to reflect the corrected scope format
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/recipes/configloader/environment.go | Core fix: constructs full Azure resource ID path (/subscriptions/{id} or /subscriptions/{id}/resourceGroups/{name}) instead of passing raw subscription ID |
| pkg/recipes/configloader/environment_test.go | Updated test name for clarity and added new test case for subscription+resource group scenario |
| pkg/recipes/recipecontext/context_test.go | Added integration tests verifying end-to-end scope parsing in recipe context for both scenarios |
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
The
v20250801previewAPI's Azure provider configuration uses separatesubscriptionIdandresourceGroupNamefields. The config loader was passing only the raw subscription ID as the scope, causing recipe context parsing to fail with "not a valid resource id".Changes
Core Fix (
pkg/recipes/configloader/environment.go)getConfigurationV20250801():Test Coverage
/subscriptions/{id}/resourceGroups/{name}/subscriptions/{id}Type of change
Issue:
Contributor checklist
Please verify that the PR meets the following requirements, where applicable:
Original prompt
v20250801previewAPI #11048💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.